package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"know-reg/api/internal/config"
	"know-reg/knowrpc/knowrpcclient"
)

type ServiceContext struct {
	Config  config.Config
	KnowRpc knowrpcclient.Knowrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		KnowRpc: knowrpcclient.NewKnowrpc(zrpc.MustNewClient(c.KnowRpc)),
	}
}
